/*
 * @(#)SubmissionSet.java
 * Date 2013-04-08
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.model.document;

import java.util.ArrayList;
import java.util.List;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonDeserialize;

import org.codehaus.jackson.map.annotate.JsonSerialize;

import org.joda.time.DateTime;
import us.hornerscorners.lamppost.model.DateTimeJsonDeserializer;

import us.hornerscorners.lamppost.model.DateTimeJsonSerializer;

import us.hornerscorners.lamppost.model.common.AbstractPersistableModel;
import us.hornerscorners.lamppost.model.common.CodedElement;
import us.hornerscorners.lamppost.model.common.InstanceIdentifier;
import us.hornerscorners.lamppost.model.common.PersistableModelType;


/**
 *
 * @author jim
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class SubmissionSet extends AbstractPersistableModel implements IAssociable {

    /** Field description */
    private final List<Author> authors;

    /** Field description */
    private CodedElement availabilityStatus;

    /** Field description */
    private ClassificationNode classificationNode;

    /** Field description */
    private CodedElement contentTypeCode;

    /** Field description */
    private final List<Attribute> extraAttributes;

    /** Field description */
    private final List<String> intendedRecipients;

    /** Field description */
    private InstanceIdentifier patientId;

    /** Field description */
    private InstanceIdentifier sourceId;

    /** Field description */
    @JsonSerialize(using = DateTimeJsonSerializer.class)
    @JsonDeserialize(using = DateTimeJsonDeserializer.class)
    private DateTime submissionTime;

    /** Field description */
    private final List<Association> submittedAssociations;

    /** Field description */
    private InstanceIdentifier uniqueId;

    /**
     * Constructs ...
     *
     */
    public SubmissionSet() {

        super(PersistableModelType.SubmissionSet);

        this.authors = new ArrayList<>();
        this.extraAttributes = new ArrayList<>();
        this.intendedRecipients = new ArrayList<>();
        this.submittedAssociations = new ArrayList<>();
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<Author> getAuthors() {
        return authors;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public CodedElement getAvailabilityStatus() {
        return availabilityStatus;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public ClassificationNode getClassificationNode() {
        return classificationNode;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public CodedElement getContentTypeCode() {
        return contentTypeCode;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<Attribute> getExtraAttributes() {
        return extraAttributes;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<String> getIntendedRecipients() {
        return intendedRecipients;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    @Override
    public InstanceIdentifier getPatientId() {
        return patientId;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public InstanceIdentifier getSourceId() {
        return sourceId;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public DateTime getSubmissionTime() {
        return submissionTime;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<Association> getSubmittedAssociations() {
        return submittedAssociations;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    @Override
    public InstanceIdentifier getUniqueId() {
        return uniqueId;
    }

    /**
     * Method description
     *
     *
     * @param availabilityStatus
     */
    public void setAvailabilityStatus(CodedElement availabilityStatus) {
        this.availabilityStatus = availabilityStatus;
    }

    /**
     * Method description
     *
     *
     * @param classificationNode
     */
    public void setClassificationNode(ClassificationNode classificationNode) {
        this.classificationNode = classificationNode;
    }

    /**
     * Method description
     *
     *
     * @param contentTypeCode
     */
    public void setContentTypeCode(CodedElement contentTypeCode) {
        this.contentTypeCode = contentTypeCode;
    }

    /**
     * Method description
     *
     *
     * @param patientId
     */
    public void setPatientId(InstanceIdentifier patientId) {
        this.patientId = patientId;
    }

    /**
     * Method description
     *
     *
     * @param sourceId
     */
    public void setSourceId(InstanceIdentifier sourceId) {
        this.sourceId = sourceId;
    }

    /**
     * Method description
     *
     *
     * @param submissionTime
     */
    public void setSubmissionTime(DateTime submissionTime) {
        this.submissionTime = submissionTime;
    }

    /**
     * Method description
     *
     *
     * @param uniqueId
     */
    public void setUniqueId(InstanceIdentifier uniqueId) {
        this.uniqueId = uniqueId;
    }
}
